e0266aa02146deef83b855d5632bfe0ab8c85336,platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/VfsImplUtil.java,VfsImplUtil,refreshAndFindFileByPath,#NewVirtualFileSystem#String#,94
Before Change
@Nullable
public static NewVirtualFile refreshAndFindFileByPath(@NotNull final NewVirtualFileSystem vfs, @NotNull @NonNls final String path) {
final String normalizedPath = vfs.normalize(path);
if (normalizedPath == null) return null;
final String basePath = vfs.extractRootPath(normalizedPath);
NewVirtualFile file = ManagingFS.getInstance().findRoot(basePath, vfs);
if (file == null || !file.exists()) return null;
LOG.assertTrue(basePath.length() <= normalizedPath.length(),
vfs + " failed to extract root path '" + basePath + "' from '" + normalizedPath + "'");
for (String pathElement : StringUtil.tokenize(normalizedPath.substring(basePath.length()), FILE_SEPARATORS)) {
if (pathElement.isEmpty() || ".".equals(pathElement)) continue;
if ("..".equals(pathElement)) {
if (file.isSymLink()) {
After Change
}
@Nullable
public static NewVirtualFile refreshAndFindFileByPath(@NotNull NewVirtualFileSystem vfs, @NotNull @NonNls String path) {
Pair<NewVirtualFile, Iterable<String>> data = prepare(vfs, path);
if (data == null) {
return null;
}
NewVirtualFile file = data.first;
for (String pathElement : data.second) {
if (pathElement.isEmpty() || ".".equals(pathElement)) continue;
if ("..".equals(pathElement)) {